package com.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author lenovo
 * @Description
 * @Date2025-3-20 14:45
 * @Controller用于标记类，其中方法的返回值是页面的名字
 */
@CrossOrigin
@Controller
public class HelloController2 {
    @ResponseBody
    @RequestMapping("/hello2")
    public String hello(){
        //返回页面的名字
        return "hello";
    }
}
